import java.util.*;

class Person
{
	public Person(int a, String n)
	{
		age = a;
		name = n;
	}
	public void print()
	{
		System.out.println("\nAge: " + age + " Name: " + name);
	}
	private int age;
	private String name;
}

class Student extends Person
{
	public Student(int a, String n, String s)
	{
		super(a, n);
		school = s;
	}
	public void print()
	{
		super.print();
		System.out.println("School: " + school);
	}
	private String school;
}

class ClassVector {
    public static void main( String[] args )
    {
        Vector<Person> database = new Vector<Person>();               
        Person p1 = new Person(20, "Alice");
        Person p2 = new Student(21, "Bob", "Purdue");
        Student s3 = new Student(22, "Claire", "IU");
        database.add(p1);
        database.add(p2);
        database.add(s3);
        Iterator iter = database.iterator();   
        while ( iter.hasNext() )              
        {
        	Person p = (Person) iter.next();
        	p.print();
        }
        /*
         Age: 20 Name: Alice

		Age: 21 Name: Bob
		School: Purdue

		Age: 22 Name: Claire
		School: IU
         */
    }
}
